Let's start by inspiring
you with example workflows. In Cloud Workflows, a workflow is a
series of HTTP calls. This example shows
a workflow that spans two different
web services; an order service and
a payment service. To complete an order this
workflow creates an order, passes the order information
to the next call, charges a credit card
to handle the payment. In the real world, a
linear order of calls is often not enough,
you need decisions. What happens if charging
the card fails? You'll need to cancel
the order again. The workflow now changes. Create an order, charge card. If it fails, cancel the order. If it succeeds,
finish the workflow. Another pattern
you'll often see; waiting for an external
operation to complete. On Cloud Run, you're bound by the request duration
limit, 60 minutes. The maximum duration
of a workflow and Cloud Workflows is one year. Start running the operation. Stop polling for the result. Raise an error if it
failed, or succeeded. One example of a
workflow would be a batch-type process
that queries a database on a set schedule
to find new customer orders. Then for each new
order, it finds, it gets a list of recommended products that may be useful to that customer based on what
is already in their order. Finally, it sends a customer an email confirmation of their order with those
recommended products listed.